package com.suredy.app.porject.constants;

import org.apache.commons.lang3.StringUtils;

/**
 * 工期计划里程碑
 * 
 * @author VIVID.G
 * @since 2016-2-23
 * @version v0.1
 */
public enum WorkPlanMilestone {

	WP_SECTION("阶段工作"),

	WP_CHECK_STEP1("初验"),

	WP_CHECK_STEP2("终验"),

	WP_REWORK("整改工作");

	private String value;

	private WorkPlanMilestone(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public final static WorkPlanMilestone getByCode(String code) {
		if (StringUtils.isBlank(code))
			return null;

		for (WorkPlanMilestone m : WorkPlanMilestone.values()) {
			if (code.equals(m.name()))
				return m;
		}

		return null;
	}

}
